//
//  UIViewController+common.h
//  YC_GRice
//
//  Created by LiuFeng on 2018/7/10.
//  Copyright © 2018年 YeCai. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIViewController (common)



/**
 将navigationController模态

 @param viewController <#viewController description#>
 @param completion <#completion description#>
 */
- (void)presentViewController:(UIViewController *)viewController completion:(void (^)(void))completion;


/**
 给导航栏自定义颜色

 @param viewController <#viewController description#>
 @param color <#color description#>
 */
- (void)presentViewController:(UIViewController *)viewController navigationbarColor:(UIColor *)color;

/**
 进入登录系统
 */
- (void)goToLogin;


/**
 登录成功后才能进行的操作

 @param completion <#completion description#>
 */
- (void)haveLoginOperation:(void(^)(void))completion;

/**
 顶号登录
 */
+ (void)displacementLogin;


/**
 获取当前控制器

 @return <#return value description#>
 */
+ (UIViewController *)currentViewController;


/**
 将所有present视图都消失掉
 */
- (void)dismissALLViewController;

/**
 隐藏NavigationBar最下面的那条线
 */
- (void)setNavigationBarBottomLineHidden:(BOOL)hidden;

/**
 修改NavigationBar返回按钮，同时不会导致返回手势失效
 */

- (void)setBackBarButtonItemWithImage:(UIImage *)image;
-(void)constrainViewEqual:(UIView *) view;

@end
